
using CStock;
using System;
using System.Diagnostics;
using CUtil;

using TestCases.StockData;


using NUnit.Framework;
namespace TestCases.TradeSimulations
{
	

	/// <summary>Some simple Tests.</summary>
	/// 
	[TestFixture] 
	public class TradeSystemTest : ProgramContext_TestCases
	{
		
        public const string tradeSystemName = "Test_TradeSystem";
		IFactory factory;
        //GridBase gridTrade;
		

	
		[SetUp] 
		public void Init() 
		{
            this.factory = new TradeSystemFactory();
            factory.Create(tradeSystemName);

			
		}
		[Test] 
		public void CreateTradeSystem()
		{

            factory.Create(tradeSystemName);
			

		}
        [Test]
        public void Create_Test_Save()
        {
            factory.Create(tradeSystemName);
            factory.Create_TestData();

            Assert.IsTrue(factory.Serialize());

        }
        [Test]
        public void Serialize()
        {
            CreateTradeSystem();
            factory.Serialize();


        }
		[Test] 
		public void GetTradeSystemTemplate()
		{
            factory.StockObjectBase.ID = tradeSystemName;
            factory.DeSerialize();
		}
      

        [Test]
        public void TradeSystem_DeSerialize()
        {
            factory = new TradeSystemFactory();
            factory.Create(tradeSystemName);
            Assert.IsTrue(factory.DeSerialize());


        }
       
		
	}
	
}